package exercise.core;

import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;

public class ClientHandler implements Runnable{
    private Socket socket;
    public ClientHandler(Socket socket){this.socket=socket;};
    @Override
    public void run(){
        try {
            InputStream is = socket.getInputStream();
            int d ;
            while((d=is.read())!=-1){
                System.out.println((char) d);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
